import QtQuick 2.0

Canvas {
    id: root
    // canvas size
    width: 200; height: 200
    // handler to override for drawing

    onPaint: {
        var ctx = getContext("2d")
        // setup the stroke
        ctx.lineWidth = 4
        ctx.strokeStyle = "green"
        //setup  the  fill
        ctx.fillStyle = "steelblue"

        ctx.fillRect(20,20,80,80)
        ctx.clearRect(30,30, 60, 60)

        ctx.strokeRect(20,20, 40, 40)
    }

}
